<template>
    <div>
<van-tabs v-model:active="active">
  <van-tab title="标签 1">
    <div v-show="dzf">
    <p>待支付订单<span>{{ time+'秒' }}</span></p>
    <van-card
  price="2.00"
  title="商品标题"
  thumb="https://fastly.jsdelivr.net/npm/@vant/assets/ipad.jpeg"
>
  <template #tags>
    <van-tag plain type="primary">1234</van-tag>
    <van-tag plain type="primary">1234</van-tag>
  </template>
  <template #footer>
    <van-button size="mini">取消订单</van-button>
    <van-button size="mini" @click="zf">立即支付</van-button>
  </template>
</van-card>
</div>
  </van-tab>
  <van-tab title="标签 2">内容 2</van-tab>
  <van-tab title="标签 3">内容 3</van-tab>
  <van-tab title="标签 4">内容 4</van-tab>
</van-tabs>
    </div>
</template>

<script setup>
import router from '@/router';
import { ref } from 'vue';
const active = ref(0);
let time=ref(30)
let timer
let dzf=ref(true)
timer=setInterval(()=>{
    time.value--
    if(time.value==0){
        clearInterval(timer)
        dzf.value=false
    }
},1000)
const zf=()=>{
    router.push('/xq')
}
</script>

<style lang="scss" scoped>

</style>